// 以前 token 令牌，如果存到了本地，每一次都写这么长，太麻烦
// localStorage.setItem(键， 值)
// localStorage.getItem(键)
// localStorage.removeItem(键)
const KEY = "my-token-vant-mobile";
// 取
export const getToken = () => {
  return localStorage.getItem(KEY);
};
// 存
export const setToken = (data) => {
  localStorage.setItem(KEY, data);
};
// 删
export const removeToken = () => {
  localStorage.removeItem(KEY);
};
// export { getToken, setToken, removeToken };

//存城市的值
export const setCity = (newToken) => {
  // localStorage.setItem(CITYNAME, newToken)
  localStorage.setItem('CITYNAME', JSON.stringify(newToken))
}
//取城市的值
export const getCity = () => {
  // return localStorage.setItem(CITYNAME)
  return JSON.parse(localStorage.getItem('CITYNAME'))
}